const str1 = 'i am student and teacher!';
console.log(str1.endsWith('teacher!'));
// true
const str3 = "hello world"
console.log(str3.endsWith('lo', 5));
// true
const str2 = 'Is this your grid friend?';
console.log(str2.endsWith('friend'));
// false